package com.zw.admin.server.service;


import com.zw.admin.server.model.Device;
import com.zw.admin.server.model.Space;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public interface SpaceService {

    int saveOrUpdateSpace(Space space);

    int saveOrUpdateSpaceDevice(String spaceId,String deviceId);

    int saveOrUpdateUserSpace(Long userId,String spaceId);

    int countSpace(Map<String, Object> params);

    int countSpaceDevice(Map<String, Object> params);

    List<Space> spaceList(Map<String, Object> params, Integer offset, Integer limit);

    List<Device> spaceDeviceList(Map<String, Object> params, Integer offset, Integer limit);

    int delSpace(Long spaceId);

    int deleteSpaceDeviceBySpaceId(Long spaceId);

    int deleteBySpaceDeviceId(Long deviceId);


    int editSpaceName(Long spaceId, String spaceName);

    List<Space> getTopNode();

    List<Space> getSubNode(String spaceId);

    ArrayList<String> getAllSubId(String spaceId);

    List<Device> getSpaceDevice(ArrayList<String> spaceIds);

    int delSpaceDevice(String spaceId, List<String> deviceIds);

    int addSpaceDevice(String spaceId, List<String> deviceIds);

    List<String> getSpaceDeviceIds(Long spaceId);

    List<Device> getUnableDevice();
}
